<%@ page contentType="text/html; charset=utf-8" language="java"
	import="java.sql.*" errorPage=""%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'welcome.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<style type="text/css">
<!--
body {
	background-image: url("image/background.jpg");
}
-->
</style>
	</head>

	<body>

		<div>
			<div>
				欢迎您：
				<s:property value="#session.user.name" />
				&nbsp;
				<a href="manage.action">管理博客</a>&nbsp;
				<a href="logout.action">退出</a>
			</div>

			<div align="right">
				<form action="query.action" method="post">
					<input type="text" name="name">
					<select name="type">
						<option value="1">
							用户名
						</option>
						<option value="2">
							博文
						</option>
						<option value="3">
							相册
						</option>
					</select>
					<input type="submit" value="搜索">
				</form>
			</div>
		</div>

		<div>
			<div style="float: left;">
				最新用户：
				<table border="1" width="250px;">
					<s:iterator value="#request.recentUsers" begin="0">
						<tr>
							<td>
								<a href="viewUser.action?user.id=<s:property value="id"/>"><s:property
										value="name" /> </a>
							</td>
						</tr>
					</s:iterator>
				</table>
			</div>
			<div style="float: left;">
				最新博文：
				<table border="1" width="250px;">
					<s:iterator value="#request.recentArticles" begin="0">
						<tr>
							<td>
								<a href="viewArticle.action?article.id=<s:property value="id"/>"><s:property
										value="title" /> </a>
							</td>
						</tr>
					</s:iterator>
				</table>
			</div>
			<div style="float: left;">
				最新相册：
				<table border="1" width="250px;">
					<s:iterator value="#request.recentAlbums" begin="0">
						<tr>
							<td>
								<a href="viewAlbum.action?album.id=<s:property value="id"/>"><s:property
										value="title" /> </a>
							</td>
						</tr>
					</s:iterator>
				</table>
			</div>
		</div>

	</body>
</html>
